<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>积分商城</title>
    <link rel="stylesheet" href="__STATIC_URL__/static/mobile/css/weui.css" />
</head>
<style type="text/css">
    body {
        background: #F8F8F8;
    }
    .foodimg{
        width: 100px;
        height: 100px;
    }
    .foodimg img{
        width: 100px;
        height: 100px;
    }
    .weui-cells{
        font-size: 14px;
    }
    .jifen{
        color: #FF817B;
    }
    .shijian{
        color: #ACACAC;
    }
    .weui-panel__hd{
        color:#000;
    }
    .weui-media-box__desc{
        color: #555555;
    }
    .weui-media-box__desc p{
        line-height: 30px;
    }
    .duihuan{
        position: fixed;
        bottom: 0;
        display: block;
        width: 97%;
        padding: 10px 0;
        background: #3cc360;
        color: #fff;
        border-radius: 5px;
        margin: 5px;
        font-size: 18px;
        text-align: center;
    }
</style>
<body>
<div class="container" id="container">
    <div class="page navbar js_show">
        <div class="page__bd">
            <div class="weui-cells" style="margin-top: 0;">
                <div class="weui-cell">
                    <div class="weui-cell__hd foodimg" style="position: relative;margin-right: 10px;">
                        <img src="{$info.goods_img}">
                    </div>
                    <div class="weui-cell__bd">
                        <p>{$info.goods_name}</p>
                        <p class="jifen">{$info.goods_price}积分</p>
                        <p class="shijian" style="margin-top: 24px;">开始时间:{$info.begin_time|date="Y-m-d",###}</p>
                        <p class="shijian">结束时间:{$info.end_time|date="Y-m-d",###}</p>
                    </div>
                </div>
            </div>
            <!--<div class="weui-cells">-->
                <!--<a href="{:url('carduser/storelist',array('card_id'=>$card['card_id']))}">-->
                    <!--<div class="weui-cell weui-cell_access">-->
                        <!--<div class="weui-cell__bd" style="color: #000;">适用门店</div>-->
                        <!--<div class="weui-cell__ft" style="font-size: 0">-->
                            <!--<span style="vertical-align:middle; font-size: 17px;"></span>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</a>-->
            <!--</div>-->
            <div class="weui-panel weui-panel_access">
                <div class="weui-panel__hd">兑换说明</div>
                <div class="weui-panel__bd">
                    <div class="weui-media-box weui-media-box_text">
                        <div class="weui-media-box__desc">
                            <p>兑换品名：{$info.goods_name}</p>
                            <p>注意详情：{$info.show}</p>
                        </div>
                    </div>
                </div>
            </div>
        
            <!--是否过期-->
            {gt name="info.end_time" value=":time()"}
                <!--是否库存-->
                {gt name="info.stock" value="info.getsume"}
                    <a class="duihuan" >没有库存</a>
                {else/}
                    <!--商品类别-->
                    {eq name="info.goods_type" value="card_dis"}
                    <!--卡券是否过期-->
                        {eq name=":filteroffcard($info['goods_card_id'])" value="true"}
                            <!--是否已达到最高领取限制-->
                            {if condition="getcardgetsume($info['goods_card_id']) == getcardgetuser($info['goods_card_id'],$user['openid'])" }
                                <a class="duihuan" >已达到最高领取上限</a>
                            {else/}
                                <a class="duihuan" href="{:url('Cardshop/orderadd',['id'=>$info['id'],'card_id'=>$card['card_id']])}">立即兑换</a>
                            {/if}
                        {else/}
                            <a class="duihuan" href="javscript:void(0);">该卡券已过期</a>
                        {/eq}
                    {/eq}
                    <!--是否红包-->
                    {eq name="info.goods_type" value="red_money"}
                        <a class="duihuan" href="javscript:void(0);">暂未开放</a>
                    {/eq}
                {/gt}
            {else/}
            <!--停止兑换-->
            <a class="duihuan" href="javscript:void(0);">已停止兑换</a>
            {/gt}
                <!--{gt name="info.end_time" value=":time()"}-->
                    <!--{gt name="info.stock" value="info.getsume"}-->
                        <!--<a class="duihuan" >没有库存</a>-->
                        <!--{else/}-->
                         <!--<a class="duihuan" href="{:url('Cardshop/orderadd',['id'=>$info['id'],'card_id'=>$card['card_id']])}">立即兑换</a>-->
                    <!--{/gt}-->
                <!--{else/}-->
                    <!--<a class="duihuan" href="javscript:void(0);">已停止兑换</a>-->
                <!--{/gt}-->
        </div>
    </div>
</div>
</body>
<script src="__STATIC_URL__/static/jquery/3.2.1/jquery.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
    wx.config({$share.wxjssdk});
    wx.ready(function(){
        wx.hideAllNonBaseMenuItem();

        // config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。
    });
</script>
<script type="text/javascript" class="navbar js_show">
    $(function() {
        $('.weui-navbar__item').on('click', function() {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
        });
    });
</script>
</html>